<div style='max-height:500px;overflow:auto;min-width:850px;'>
    <table class="table table-hover" style="min-width:850px;">
        <thead>
        <th style='width:40px;'></th>
        <th>商品名</th>
        <th>售价</th>
        <th>库存</th>
        <th>选择规格</th>
        <th>指定数量</th>
        <th>指定价格</th>
        <th>操作</th>
        </thead>
        <tbody>
        {loop $list $row}
        <tr>
            <td><img src='{php echo tomedia($row['thumb'])}' style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> </td>
            <td>{$row['title']}</td>
            <td id="marketprice_{$row['id']}">{$row['marketprice']}</td>
            <td id="total_{$row['id']}">{php echo intval($row['total'])}</td>
            <td>{if $row['spc']!=''}<select class="form-control" id="spc_{$row['id']}" onchange="spcselect(this);">{loop $row['spc'] $r}<option data-id="{$row['id']}" data-specs="{php  echo $r['id'];}" data-marketprice="{$r['marketprice']}" data-stock="{$r['stock']}" data-title="{php echo $r['title']}" >{php echo $r['title']}</option>{/loop}</select>{else}无规格{/if}</td>
            <td><input type="number" class="form-control" name="need_goods_{$row['id']}" placeholder="输入数量"  ></td>
            <td><input type="number" class="form-control" name="need_money_{$row['id']}" placeholder="输入价格"  ></td>
            <td ><a href="javascript:;" onclick='goods_select(this, {"id":"{$row['id']}","name":"{$row['title']}","total":{$row['total']}})'>选择</a></td>
        </tr>
        {/loop}
        {if $total<=0}
        <tr>
            <td colspan='5' align='center'>抱歉！未查询到{if !empty($title)}与“{$title}”{/if}相关的商品，请更换关键字后重试。</td>
        </tr>
        {else}
        <tr>
            <td colspan="6" class="text-center">
                {$pager}
            </td>
        </tr>
        {/if}
        </tbody>
    </table>
</div>
